package com.hkts.performance.common;

import lombok.Getter;
import lombok.Setter;



public class CustomPage {
    @Getter@Setter
    private Integer pageNumber;
    @Getter@Setter
    private Integer pageSize;
    @Getter
    private Integer totalRows;
    @Getter@Setter
    private Integer totalPages;
    @Getter@Setter
    private Object resultData;
    @Getter@Setter
    private String order;


    public void setTotalRows(Integer totalRows) {
        if(totalRows%pageSize==0){
            this.totalPages= totalRows/pageSize;
        }else{
            this.totalPages= totalRows/pageSize+1;
        }
        this.totalRows = totalRows;
    }
}
